package br.ufrn.plugin.pewsrt.preferences;

import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.handlers.HandlerUtil;

import br.ufrn.plugin.pewsrt.Activator;

public class ShowPreferenceValues extends AbstractHandler{

	@Override
	public Object execute(ExecutionEvent event) throws ExecutionException {
		System.out.println("execute");
	    Shell shell = HandlerUtil.getActiveWorkbenchWindowChecked(event).getShell();
	    String myPrefString = Activator.getDefault().getPreferenceStore().getString("PreferenceConstants.WSDL_PATH");
	    MessageDialog.openInformation(shell, "Info", myPrefString);
	    // I assume you get the rest by yourself
		return null;
	}

}
